<?php

namespace App\Models;

use App\Traits\HelperTrait;
use Illuminate\Database\Eloquent\Model;

class Store extends Model
{


    protected $guarded = [];
    protected $table = 'shop_stores';


    // 店铺评论关联
    public function comments()
    {
        return $this->hasMany('App\Models\OrderComment', 'store_id', 'id');
    }

    // 订单
    public function orders()
    {
        return $this->hasMany('App\Models\Order', 'store_id', 'id');
    }


    // 订单
    public function storeCate()
    {
        return $this->hasOne('App\Models\StoresCate', 'id', 'class_id');
    }

}
